function a(a) {
    return console.log(a), {
        color: [ "#8484FC", "#4C7CFB", "#26A8FC", "#FEC042" ],
        grid: {
            left: "10",
            right: "10",
            top: "10",
            bottom: "10",
            containLabel: !0
        },
        tooltip: {
            show: !0,
            trigger: "axis"
        },
        series: [ {
            type: "pie",
            radius: [ "25%", "50%" ],
            center: [ "50%", "50%" ],
            data: a,
            animation: !1,
            label: {
                position: "outer",
                alignTo: "none",
                bleedMargin: 5,
                normal: {
                    show: !0,
                    textStyle: {
                        fontSize: 8
                    }
                }
            },
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: "rgba(0, 0, 0, 0.5)"
                },
                normal: {
                    label: {
                        show: !0,
                        formatter: "{b} : {d}%"
                    },
                    labelLine: {
                        show: !0
                    }
                }
            },
            left: 0,
            right: 0,
            top: 0,
            bottom: 0
        } ]
    };
}

var e = function(a) {
    if (a && a.__esModule) return a;
    var e = {};
    if (null != a) for (var t in a) Object.prototype.hasOwnProperty.call(a, t) && (e[t] = a[t]);
    return e.default = a, e;
}(require("../../../ec-canvas/echarts")), t = getApp();

Page({
    data: {
        sjTab1Data: [ {
            name: "150及以上",
            value: 10
        }, {
            name: "135-149",
            value: 20
        }, {
            name: "110-134",
            value: 30
        }, {
            name: "109及以下",
            value: 40
        } ]
    },
    onLoad: function(o) {
        wx.showLoading();
        var i = this;
        wx.getStorageSync("service_id") && this.setData({
            id: wx.getStorageSync("service_id")
        }), this.ecComponentSjTab2Pie = this.selectComponent("#mychart-sj-tab-pie2"), wx.request({
            url: t.globalData.request_url + "api/zhiweiku/gk/getMsresult.php",
            method: "POST",
            data: {
                name: o.name,
                zkzh: o.code,
                diqu: wx.getStorageSync("position")
            },
            header: {
                "content-type": "application/x-www-form-urlencoded"
            },
            success: function(t) {
                var o = i.data.sjTab1Data;
                o[0].value = t.data.data[0], o[1].value = t.data.data[1], o[2].value = t.data.data[2], 
                o[3].value = t.data.data[3], i.setData({
                    sjTab1Data: o,
                    name: t.data.extra,
                    position: wx.getStorageSync("position")
                }), i.ecComponentSjTab2Pie.init(function(t, o, n, r) {
                    var s = e.init(t, null, {
                        width: o,
                        height: n,
                        devicePixelRatio: r
                    });
                    return s.setOption(a(i.data.sjTab1Data)), s;
                }), wx.hideLoading(), 200 == t.data.code ? i.setData({
                    enter: !0
                }) : (i.setData({
                    enter: !1
                }), wx.hideLoading());
            }
        });
    },
    onShareAppMessage: function() {
        return {
            title: "省考小助手",
            path: "/pages/index/index"
        };
    }
});